/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rational.sheet.table.cell.model.format;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Overmind
 */
public class DateCellFormat
    implements CellFormat
{
    private SimpleDateFormat dateFormat;
      
    public DateCellFormat()
    {
        dateFormat = new SimpleDateFormat();
    }
    
    public DateCellFormat(String dataStyle)
    {
        dateFormat = new SimpleDateFormat(dataStyle);
    }
    
    @Override
    public String formated(String value)
    {
        try
        {
            Date data = dateFormat.parse(value);
            
            throw new UnsupportedOperationException();
        }
        catch(ParseException pe)
        {
            return value;
        }
    }
    
}
